GL_SPHERE_MAP
Self-Generated Environment Mapping :
- Around a
given
Object , render the environment cube :
from the Object centre, 6 views (fov 45 degrees) of the
scene
excluding
the Object
- Each time the ModelView matrix or any of the 6
environmental walls changes, re-generate the Object's
environment map :
[ update the obsolete Environmental wall = draw & read ]
foreach texel (s,t)
compute corresponding R vector
Intersect with environment cube
Get environment color
next texel
- Use this environment map for the Object only